﻿<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="fm" uri="http://www.springframework.org/tags/form"%>
<%@include file="/WEB-INF/jsp/common/head.jsp"%>
<div class="right">
	<div class="location">
		<strong>你现在所在的位置是:</strong> <span>用户管理页面 >> 用户添加页面</span>
	</div>
	<div class="providerAdd">
		<!-- 请在此处添加新增数据表单 -->
		<fm:form id="userForm" method="post" modelAttribute="user">
			<input type="hidden" name="method" value="add">
			<!--div的class 为error是验证错误，ok是验证成功-->
			<div>
				<label for="code">用户编码：</label>
				<fm:input path="code" />
				<!-- 放置提示信息 -->
				<font color="red"></font>
				<fm:errors path="code" cssStyle="color:#ff0000"/>
			</div>
			<div>
				<label for="name">用户名称：</label>
				<fm:input path="name" />
				<font color="red"></font>
				<fm:errors path="name" cssStyle="color:red"/>
			</div>
			<div>
				<label for="password">用户密码：</label>
				<fm:password path="password" />
				<font color="red"></font>
				<fm:errors path="password" cssStyle="color:red"/>
			</div>
			<div>
				<label for="ruserPassword">确认密码：</label>
				<input type="password" name="ruserPassword" id="ruserPassword" value="">
				<font color="red"></font>
			</div>
			<div>
				<label for="UserRole">用户角色：</label>
				<select name="role" id="UserRole">

					<option value="0">--请选择--</option>
					<option <c:if test="${1 == user.role }">selected="selected"</c:if>
							value="1">员工</option>
					<option <c:if test="${2 == user.role }">selected="selected"</c:if>
							value="2">会议管理员</option>
					<option <c:if test="${3 == user.role}">selected="selected"</c:if>
							value="3">超级管理员</option>

				</select>
				<font color="red"></font>
			</div>
			<div>
                <label>用户状态：</label>
				<select name="status" id="UserStatus">
					<option value="1" selected>在职</option>
					<option value="0">离职</option>
				</select>
				<font color="red"></font>
			</div>
			<div class="providerAddBtn">
				<input type="button" name="add" id="add" value="保存">
				<input type="button" id="back" name="back" value="返回">
			</div>
		</fm:form>
	</div>
</div>
</section>
<%@include file="/WEB-INF/jsp/common/foot.jsp"%>
<!-- 请注意更新JS脚本路径 -->
<script type="text/javascript" 
	src="${pageContext.request.contextPath }/statics/js/useradd.js"></script>

